Home | | Latest | About | Random
# 32 Change of basis: Part 0 - What are linear maps doing and the idea of similarity.
Let us start with a motivational question: What are linear maps doing?
We will pay special attention to linear maps $T:\mathbb{R}^{k} \to \mathbb{R}^{n}$ between Euclidean spaces, where the map can be realized by a left-matrix multiplication by some matrix $A=[T]_{\text{std}}$, where $T(\vec x) = A\vec x$.
In this view, $n\times k$ matrices $A$ are just "linear maps", when we think of them as linear transformations $\vec x \mapsto A\vec x$.
## What we know so far.
Ok. Back to the question, what are linear maps doing? Well we know several things so far:
(1) We know, by definition, a linear map $T:V \to U$ between linear spaces $V,U$ is a function that **preserves sum** and **preserves scaling**, that is $$
\begin{array}{l}
T(\vec x + \vec y) = T(\vec x) + T(\vec y), & \text{for all \(\vec x,\vec y \in V\)} \\
T(c\vec x) = c T(\vec x), & \text{for all \(\vec x\in V\), and scalar \(c\).}
\end{array}
$$Together, in fact, this says linear maps **preserve linear combinations**. That is, if we have some linear combination $$c_{1}\vec x_{1}+ c_{2}\vec x_{2}+\cdots +c_{m}\vec x_{m}$$then $$
T(c_{1}\vec x_{1}+ c_{2}\vec x_{2}+\cdots +c_{m}\vec x_{m})=c_{1}T(\vec x_{1})+ c_{2}T(\vec x_{2})+\cdots +c_{m}T(\vec x_{m}).
$$
(2) Geometrically this means linear maps **transforms parallelopipeds to parallelopipeds**. The pre-and post-transformed parallelopipeds can be of different dimensions. A 2-dimensional parallelopiped is a parallelogram, a 1-dimensional parallelopiped is a line, and a 0-dimensional parallelopiped is a point.
And in the case where we have a linear map $T:\mathbb{R}^{n} \to \mathbb{R}^{n}$ whose standard matrix $[T]_{\text{std}}$ is a square matrix, then we know that $\det[T]_{\text{std}}$ gives the (signed) geometric scaling factor of this transformation.
Ok, this is good and all, but what about specific examples? We saw some concrete examples of linear maps from $\mathbb{R}^{2}\to\mathbb{R}^{2}$ of geometric flavors, specifically
- Rotations about the origin, counterclockwise by angle $\theta$. The standard matrix of this map is $$
A_{\theta} = \begin{pmatrix}\cos\theta & -\sin\theta \\ \sin\theta & \cos\theta\end{pmatrix}.
$$
- Orthogonal projection onto the line $L = \operatorname{span}(\vec u)$, where $\vec u = \begin{pmatrix}u_{1}\\u_{2}\end{pmatrix}$ is a unit vector with $u_{1}^{2}+u_{2}^{2}=1$. The standard matrix of this map is $$P_{\vec u} = \begin{pmatrix}u_{1}^{2} & u_{1}u_{2} \\u_{1} u_{2} & u_{2}^{2}\end{pmatrix}.$$
- Reflection across the line $L = \operatorname{span}(\vec u)$, where $\vec u = \begin{pmatrix}u_{1}\\u_{2}\end{pmatrix}$ is a unit vector. The standard matrix of this map is $$
A_{L} = 2P_{\vec u} -I=\begin{pmatrix}2u_{1}^{2}-1 & u_{1}u_{2} \\ u_{1}u_{2} & 2u_{2}^{2}-1\end{pmatrix}
$$ and in fact, if we describe the unit vector $\vec u$ in polar coordinates instead, that $\vec u = \begin{pmatrix}\cos\theta \\ \sin\theta\end{pmatrix}$, then $$
A_{L} = \begin{pmatrix}2\cos^{2}\theta -1 & 2\cos\theta\sin\theta \\ 2\cos\theta\sin\theta & 2\sin^{2}\theta-1\end{pmatrix} = \begin{pmatrix}\cos 2\theta & \sin2\theta \\
\sin2\theta & -\cos2\theta\end{pmatrix}
$$as we have seen in previous notes/lectures/homework.
But this is perhaps **too specific** -- not every matrix is a rotation or a projection or a reflection. What about matrices you just randomly write down?
## A tale of two matrices.
Let us look at these two matrices $A$ and $B$ where $$
A = \begin{pmatrix}3 & 0 \\ 0 & -1\end{pmatrix}\quad\text{and}\quad B = \begin{pmatrix}1 & 2\\2 & 1\end{pmatrix}.
$$
Let us examine what each of the matrices is doing, that is, what is the linear maps $T_{A},T_{B}:\mathbb{R}^{2}\to \mathbb{R}^{2}$ where $T_{A}(\vec x) = A\vec x$ and $T_{B}(\vec x) = B\vec x$ are doing.
For $T_{A}(\vec x) = \begin{pmatrix}3 & 0 \\ 0 & -1\end{pmatrix}\vec x$, let us examine what it does to standard unit vectors $e_{1}=\begin{pmatrix}1 \\0\end{pmatrix}$ and $e_{2} = \begin{pmatrix}0 \\ 1\end{pmatrix}$.
Note that $T_{A}(e_{1}) = \begin{pmatrix}3 \\ 0\end{pmatrix} = 3e_{1}$ and $T_{B}(e_{2}) = \begin{pmatrix}0\\-1\end{pmatrix} = -e_{2}$. Geometrically it scales the unit square by $3$ along the $e_{1}$ direction, and scales by $-1$ in the $e_{2}$ direction. Let us draw a sketch here
![[smc-spring-2024-math-13/linear-algebra-notes/---files/Pasted image 20240423092409.png]]
This map $T_{A}$ is simple enough, and we can make the following observation
> **Observation.** If $A$ is a **diagonal matrix** (necessarily square), where $$
A = \begin{pmatrix}\lambda_{1} \\ &\lambda_{2}\\&&\ddots \\ &&&\lambda_{n}\end{pmatrix} = \text{diag}(\lambda_{1}, \lambda_{2},\ldots,\lambda_{n}),
$$then the linear map $T_{A}(\vec x) = A\vec x$ is just scaling the $e_{i}$ direction by $\lambda_{i}$.
In some sense, diagonal matrices are the easiest to understand.
Let us now look at $T_{B}(\vec x) = \begin{pmatrix}1 & 2\\2 & 1\end{pmatrix}\vec x$. Again we look at how it transforms the standard unit vectors $e_{1}$ and $e_{2}$.
We have $T_{B}(e_{1})= \begin{pmatrix}1\\2\end{pmatrix}$ and $T_{B}(e_{2}) =\begin{pmatrix}2\\1\end{pmatrix}$. But this is not geometrically clear what is happening (except the expected "parallelogram transformed into a parallelogram".)
However, instead of looking at $T_{B}$ on $e_{1},e_{2}$, let us entertain for a moment that instead we look at a basis set $b_{1},b_{2}$ where $$
b_{1} = \begin{pmatrix}1\\1\end{pmatrix} \quad\text{and}\quad b_{2} = \begin{pmatrix}1\\-1\end{pmatrix}
$$
Observe that $T_{B}(b_{1}) = \begin{pmatrix}3\\3\end{pmatrix} = 3b_{1}$ and $T_{B}(b_{2}) = \begin{pmatrix}-1\\1\end{pmatrix} = - b_{2}$. This means $T_{B}$ scales along the $b_{1}$ direction by $3$, and scales along the $b_{2}$ direction by $-1$. A picture of this look like this
![[1 teaching/smc-spring-2024-math-13/linear-algebra-notes/---files/Pasted image 20240423093243.png]]
Wait a minute, this is similar to what $T_{A}$ is doing, except with respect to a different coordinate system!
When this happens, we say $T_{A}$ and $T_{B}$ are **similar** to each other, and that the matrices $A$ and $B$ are **similar matrices** of each other, and write $$
A \stackrel{\text{sim}}\sim B.
$$We will properly define what it means to be similar later, but roughly speaking it means that $A$ and $B$ have the same effects on their respective chosen basis sets, hence similar.
A few questions we will address in the coming notes are:
- What does similarity means exactly?
- How can we tell if two matrices are similar?
- And when is a matrix similar to a diagonal matrix, as it is the simplest kind of matrices to understand its behavior.
But first, we need to study how to view vectors with respect to a different basis set (coordinate system). We will do so in the next set of notes.